//////////////////////////////////////////////////////////////////////////////////////////////
//	File			:	"Entity.cpp"
//
//	Author			:	Mike Davis, Matt Stover, James Thornton, Keith Webster
//	
//	Project			:	TacWars
//
//	Last Modified	:	11/6/2013
//
//	Purpose			:	
//
//////////////////////////////////////////////////////////////////////////////////////////////

#include "Entity.h"
#include <cassert>
#include "../../SGD Wrappers/CSGD_TextureManager.h"

Entity::Entity()
{
	Type = GENERAL;
	State = IDLE;

	moveRange = attackRange = attackDamage = Health = Loyalty = abilityCooldown = 0;
	abilityRange = imageID = posX = posY = 0;
	Height = Width = 0;
	hasFlag = isBuffed = isScared = false;

	refCount = 1;

}
Entity::~Entity()
{
}
/*virtual*/ void Entity::Update( float fElapsedTime)
{

}
/*virtual*/ void Entity::Render( void )
{
	assert(imageID != -1 && "Entity::Render - image not set");
	CSGD_TextureManager::GetInstance()->Draw(imageID, posX, posY, 1.0f, 1.0f, nullptr, Width/2, Height/2);
}
/*virtual*/ RECT Entity::GetRect( void ) const
{
	RECT rect = {0,0,0,0};

	return rect;
}
/*virtual*/ void Entity::HandleCollision( const IEntity* pOther )
{

}
/*virtual*/ void Entity::AddRef ( void )
{
	assert(refCount != UINT_MAX && "Entity::AddRef - refcount exceeded max");
	++refCount;
}
/*virtual*/ void Entity::Release( void )
{
	--refCount;
	if(refCount == 0)
		delete this;
}
/*virtual*/ void Entity::Move()
{

}
/*virtual*/ void Entity::Attack()
{

}
/*virtual*/ void Entity::UseAbility()
{

}
/*virtual*/ void Entity::Capture()
{

}